package com.study.model.pojo;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the scheduleform database table.
 * 
 */
@Entity
@NamedQuery(name="Scheduleform.findAll", query="SELECT s FROM Scheduleform s")
public class Scheduleform implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int schno;

	private int oid;

	private int ptype;

	private String remark;

	@Temporal(TemporalType.DATE)
	private Date schpretime;

	private int schstates;

	private BigDecimal schsum;

	@Temporal(TemporalType.DATE)
	private Date schtime;

	private int sctype;

	private String theme;

	private int userid;
	
	private BigDecimal payed;
	public void setPayed(BigDecimal payed) {
		this.payed = payed;
	}
	public BigDecimal getPayed() {
		return payed;
	}

	//bi-directional many-to-one association to Inst
	@OneToMany(mappedBy="scheduleform")
	private List<Inst> insts;

	//bi-directional many-to-one association to Payplan
	@OneToMany(mappedBy="scheduleform")
	private List<Payplan> payplans;

	//bi-directional many-to-one association to Purchase
	@OneToMany(mappedBy="scheduleform")
	private List<Purchase> purchases;

	//bi-directional many-to-one association to Depotgoodsshelf
	@ManyToOne
	@JoinColumn(name="dgsnum")
	private Depotgoodsshelf depotgoodsshelf;

	//bi-directional many-to-one association to Supplier
	@ManyToOne
	@JoinColumn(name="supno")
	private Supplier supplier;
	
	private int sdel;
	
	public void setSdel(int sdel) {
		this.sdel = sdel;
	}
	public int getSdel() {
		return sdel;
	}

	public Scheduleform() {
	}

	public int getSchno() {
		return this.schno;
	}

	public void setSchno(int schno) {
		this.schno = schno;
	}

	public int getOid() {
		return this.oid;
	}

	public void setOid(int oid) {
		this.oid = oid;
	}

	public int getPtype() {
		return this.ptype;
	}

	public void setPtype(int ptype) {
		this.ptype = ptype;
	}

	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Date getSchpretime() {
		return this.schpretime;
	}

	public void setSchpretime(Date schpretime) {
		this.schpretime = schpretime;
	}

	public int getSchstates() {
		return this.schstates;
	}

	public void setSchstates(int schstates) {
		this.schstates = schstates;
	}

	public BigDecimal getSchsum() {
		return this.schsum;
	}

	public void setSchsum(BigDecimal schsum) {
		this.schsum = schsum;
	}

	public Date getSchtime() {
		return this.schtime;
	}

	public void setSchtime(Date schtime) {
		this.schtime = schtime;
	}

	public int getSctype() {
		return this.sctype;
	}

	public void setSctype(int sctype) {
		this.sctype = sctype;
	}

	public String getTheme() {
		return this.theme;
	}

	public void setTheme(String theme) {
		this.theme = theme;
	}

	public int getUserid() {
		return this.userid;
	}

	public void setUserid(int userid) {
		this.userid = userid;
	}

	public List<Inst> getInsts() {
		return this.insts;
	}

	public void setInsts(List<Inst> insts) {
		this.insts = insts;
	}

	public Inst addInst(Inst inst) {
		getInsts().add(inst);
		inst.setScheduleform(this);

		return inst;
	}

	public Inst removeInst(Inst inst) {
		getInsts().remove(inst);
		inst.setScheduleform(null);

		return inst;
	}

	public List<Payplan> getPayplans() {
		return this.payplans;
	}

	public void setPayplans(List<Payplan> payplans) {
		this.payplans = payplans;
	}

	public Payplan addPayplan(Payplan payplan) {
		getPayplans().add(payplan);
		payplan.setScheduleform(this);

		return payplan;
	}

	public Payplan removePayplan(Payplan payplan) {
		getPayplans().remove(payplan);
		payplan.setScheduleform(null);

		return payplan;
	}

	public List<Purchase> getPurchases() {
		return this.purchases;
	}

	public void setPurchases(List<Purchase> purchases) {
		this.purchases = purchases;
	}

	public Purchase addPurchas(Purchase purchas) {
		getPurchases().add(purchas);
		purchas.setScheduleform(this);

		return purchas;
	}

	public Purchase removePurchas(Purchase purchas) {
		getPurchases().remove(purchas);
		purchas.setScheduleform(null);

		return purchas;
	}

	public Depotgoodsshelf getDepotgoodsshelf() {
		return this.depotgoodsshelf;
	}

	public void setDepotgoodsshelf(Depotgoodsshelf depotgoodsshelf) {
		this.depotgoodsshelf = depotgoodsshelf;
	}

	public Supplier getSupplier() {
		return this.supplier;
	}

	public void setSupplier(Supplier supplier) {
		this.supplier = supplier;
	}

}